deb: build
	rm server.py
	rm -r backupManager/

build:
	mkdir -p $(DESTDIR)usr/bin/
	mkdir -p $(DESTDIR)usr/bin/backupManager/
	mkdir -p $(DESTDIR)etc/init/
	mkdir -p $(DESTDIR)etc/init.d/

	install -m 0755 -p server.py $(DESTDIR)usr/bin/anybackupserver.py
	
	install -m 0755 -p backupManager/enum.py $(DESTDIR)usr/bin/backupManager/
	install -m 0755 -p backupManager/mixins.py $(DESTDIR)usr/bin/backupManager/
	install -m 0755 -p backupManager/__init__.py $(DESTDIR)usr/bin/backupManager/
	install -m 0644 -p upstart.conf $(DESTDIR)etc/init/anybackupserver.conf
	install -m 0644 -p server.cfg $(DESTDIR)etc/anybackupserver.conf
	install -m 0755 -p initd_script.sh  $(DESTDIR)etc/init.d/anybackupserver
	
